package uml.behavioral.visitor;

/**
 * 访问者--具体元素类<br>
 * on 2023/1/3 20:26
 */
public class Student implements Candidate {
    private int papers;
    private int avgGrades;
    private String name;

    /**
     * @param papers 论文数量
     * @param avgGrades 各科成绩平均分
     * @param name 姓名
     */
    public Student(int papers, int avgGrades, String name) {
        this.papers = papers;
        this.avgGrades = avgGrades;
        this.name = name;
    }

    public int getPapers() {
        return papers;
    }

    public void setPapers(int papers) {
        this.papers = papers;
    }

    public int getAvgGrades() {
        return avgGrades;
    }

    public void setAvgGrades(int avgGrades) {
        this.avgGrades = avgGrades;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void accept(AwardCheck checker) {
        checker.visit(this);
    }
}
